package com.ledi.guns.modular.ledipay.controller.feignClients.req;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

import lombok.Data;

import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.Range;

/**
 * 文件名称： com.ledi.guns.modular.ledipay.controller.feignClients.req.SmsPackageReq.java<br/>
 * 初始作者： 钟小平<br/>
 * 创建日期： 2018年7月9日<br/>
 * 功能说明： 套餐请求<br/>
 * =================================================<br/>
 * 修改记录：<br/>
 * 修改作者 日期 修改内容<br/>
 * ================================================<br/>
 * Copyright (乐迪教育科技有限公司-幼儿事业部) 2017-2018.All rights reserved.<br/>
 */
@Data
public class SmsPackageReq implements Serializable {

	private static final long serialVersionUID = 1L;

	@NotNull(groups = UpdateSmsPackage.class, message = "更新Id不能为空！")
	private Long id;
	/**
	 * 短信条数
	 */
	@NotNull(groups = SaveSmsPackage.class, message = "短信条数不能为空！")
	@Range(groups = { SaveSmsPackage.class, UpdateSmsPackage.class }, max = 9999999999L, min = 0L, message = "短信条数输入最多10位数！")
	private Long smsCount;
	/**
	 * 赠送短信条数
	 */
	@NotNull(groups = SaveSmsPackage.class, message = "赠送短信条数不能为空！")
	@Range(groups = { SaveSmsPackage.class, UpdateSmsPackage.class }, max = 9999999999L, min = 0L, message = "赠送短信条数最大输入10位数！")
	private Long giveSmsCount;
	/**
	 * 原价
	 */
	@NotNull(groups = SaveSmsPackage.class, message = "原价不能为空！")
	@Min(groups = { SaveSmsPackage.class, UpdateSmsPackage.class }, value = 0L, message = "原价输入错误！")
	@Max(groups = { SaveSmsPackage.class, UpdateSmsPackage.class }, value = 500000L, message = "原价最大输入50万！")
	private BigDecimal originPrice;
	/**
	 * 现价
	 */
	@NotNull(groups = SaveSmsPackage.class, message = "现价不能为空！")
	@Min(groups = { SaveSmsPackage.class, UpdateSmsPackage.class }, value = 0L, message = "现价输入错误！")
	@Max(groups = { SaveSmsPackage.class, UpdateSmsPackage.class }, value = 500000L, message = "现价最大输入50万！")
	private BigDecimal presentPrice;
	/**
	 * 套餐名称
	 */
	@NotBlank(groups = { SaveSmsPackage.class }, message = "套餐名称不能为空！")
	@Length(groups = { SaveSmsPackage.class, UpdateSmsPackage.class }, message = "套餐名称输入在1~50之间！", min = 1, max = 50)
	private String name;
	/**
	 * 状态（0下架1上架）
	 */
	private Integer status;
	private Date createTime;
	private Long creatorId;
	private Long updaterId;
	private Date updateTime;

	/**
	 * 是否删除
	 */
	private Integer isDelete = 0;
	/**
	 * 版本号
	 */
	@NotNull(groups = UpdateSmsPackage.class, message = "版本号不能为空！")
	private Integer versionNo;

	public @interface SaveSmsPackage {
	}

	public @interface UpdateSmsPackage {

	}

}
